<?php
include "resources/header.php";
include "resources/search-pages.php";
//Begin Content
?>
<script type="text/javascript">
	var map;
	var bounds;
	var existingMarkers = new Array();
	var worldCenter = new google.maps.LatLng(0,0);
	var markers = [];
	function initialize() {
		var mapOptions = {
				zoom: 2,
				maxZoom: 15,
				minZoom: 2,
				mapTypeId: google.maps.MapTypeId.ROADMAP,
				center: worldCenter,
				draggable: false,
				scrollwheel: false,
				navigationControl: false,
				mapTypeControl: false,
				scaleControl: false,
				disableDefaultUI: true,
			};
		map = new google.maps.Map(document.getElementById("places-map"),
			mapOptions);
		
		//These area marks the locations plotted
		var infowindow = new google.maps.InfoWindow(), 
			marker, i;
		bounds = new google.maps.LatLngBounds();
		for (i = 0; i < markers.length; i++) {  
			var pos = new google.maps.LatLng(markers[i][1], markers[i][2]);
			bounds.extend(pos);
			marker = new google.maps.Marker({
				position: pos,
				map: map
			});
			marker.set("id", markers[i][3]);
			var infowindow = new google.maps.InfoWindow(), 
			marker, i;
			google.maps.event.addListener(marker, 'click', (function(marker, i){
				return function() {
					infowindow.setContent(markers[i][0]);
					infowindow.open(map, marker);
				}
			})(marker, i));
			map.fitBounds(bounds);
			existingMarkers.push(marker);
		}
			
		google.maps.event.addListener(marker,'click',function() {
			infowindow.open(map,marker);
		});
	}
	google.maps.event.addDomListener(window, 'load', initialize);
	$(document).on('click', '.listed_place',function() {
		$('#comment-container').fadeIn();	
	});
</script>
<div id='admin-dashboard-container'>
	<div id='admin-add-country-container'>
		<div id='admin-add-country-title'>Add Country</div>
		<div id='admin-add-country-form'>
			<input type='text' id='admin-add-country-field'>
		</div>
	</div>
	<div id='admin-add-region-container'>
		<div id='admin-add-region-title'>Add Region</div>
		<div id='admin-add-region-form'>
			<input type='text' id='admin-add-region-field'>
		</div>
	</div>
	<div id='admin-add-country-region-container'>
		<div id='admin-add-country-region-name'>
		</div>
		<div id='admin-add-country-region-confirm'>
			Add
		</div>
		<div id='admin-lat'></div>
		<div id='admin-long'></div>
	</div>
</div>
<?php
//End Content
include "resources/footer.php";
?>